
<#include "/common/head.html"/>


 <div class="easyui-panel addPage" data-options="fit:true,border:false,novalidate:true">
    <form class="easyui-form" id="ff" method="post" data-options="novalidate:true">
        <table class="table1">
            <tr>
           		<th><span id="content_label">题干：</span></th>
               	<td>
               		<div ><input class="easyui-textbox" name="content" id="content" value="" data-options="fit: true,multiline:true"></input></div>
           		</td>
            <tr>
           		<th><span id="type_label">题型：</span></th>
               	<td>
               		<div class="wrap_input"><input class="easyui-textbox" type="text" name="type" id="type" value="" data-options="fit: true"></input></div>
           		</td>
            </tr>
            <tr>
           		<th><span id="label_label">标签：</span></th>
               	<td>
               		<div class="wrap_input"><input class="easyui-textbox" type="text" name="label" id="label" value="" data-options="fit: true"></input></div>
           		</td>
            </tr>
            <tr>
           		<th><span id="answer_label">答案：</span></th>
               	<td>
               		<div class="wrap_input"><input class="easyui-textbox" type="text" name="answer" id="answer" value="" data-options="fit: true"></input></div>
           		</td>
            </tr>
            <tr>
           		<th><span id="options_label">选项：</span></th>
               	<td>
               		<div class="wrap_input"><input class="easyui-textbox" type="text" name="options" id="options" value="" data-options="fit: true"></input></div>
           		</td>
            </tr>
            <tr>
           		<th><span id="difficulty_label">难度：</span></th>
               	<td>
               		<div class="wrap_input"><input class="easyui-textbox" type="text" name="difficulty" id="difficulty" value="" data-options="fit: true"></input></div>
           		</td>
            </tr>
            <tr>
           		<th><span id="score_label">默认分值：</span></th>
               	<td>
               		<div class="wrap_input"><input class="easyui-numberspinner" type="text" name="score" id="score" value="" data-options="fit: true"></input></div>
           		</td>
            </tr>
            <tr>
           		<th><span id="analysis_label">题目解析：</span></th>
               	<td>
               		<div class="wrap_input"><input class="easyui-textbox" type="text" name="analysis" id="analysis" value="" data-options="fit: true"></input></div>
           		</td>
            </tr>
            <tr>
           		<th><span id="grade_label">年级：</span></th>
               	<td>
               		<div class="wrap_input"><input class="easyui-numberspinner" type="text" name="grade" id="grade" value="" data-options="fit: true"></input></div>
           		</td>
            </tr>
            <tr>
           		<th><span id="courses_label">课程：</span></th>
               	<td>
               		<div class="wrap_input"><input class="easyui-numberspinner" type="text" name="courses" id="courses" value="" data-options="fit: true"></input></div>
           		</td>
            </tr>
            <tr>
           		<th><span id="chapters_label">章节：</span></th>
               	<td>
               		<div class="wrap_input"><input class="easyui-numberspinner" type="text" name="chapters" id="chapters" value="" data-options="fit: true"></input></div>
           		</td>
            </tr>
        </table>
    </form>
</div>
<script>
top.window.subPage.save = save;
function save() {
	if($("#ff").form('enableValidation').form('validate')) {
		$.post("add", getParam(), function(data) {
			top.window.closeWindow();
			top.window.subPage.loadCurrDatagrid();
		});
	}
}
function getParam() {
	var param = {
	     
       		"model.content": getInputValue("content"), 
       		"model.type": getInputValue("type"), 
       		"model.label": getInputValue("label"), 
       		"model.answer": getInputValue("answer"), 
       		"model.options": getInputValue("options"), 
       		"model.difficulty": getInputValue("difficulty"), 
       		"model.score": getInputValue("score"), 
       		"model.analysis": getInputValue("analysis"), 
       		"model.insert_time": getInputValue("insert_time"), 
       		"model.update_time": getInputValue("update_time"), 
       		"model.inputer": getInputValue("inputer"), 
       		"model.isDelete": getInputValue("isDelete"), 
       		"model.grade": getInputValue("grade"), 
       		"model.courses": getInputValue("courses"), 
       		"model.chapters": getInputValue("chapters"), 
	}
	for(key in param) {
		if(!param[key]) {
			delete param[key];
		}
	}
	return param;
}

//扩展js
</script>
<#include "/common/foot.html"/>
